<template>
  <div :style="{height: height}">
    <img :src="opt.img_url" alt="">
  </div>
</template>

<script>
export default {
  props: ['opt'],
  computed: {
    height() {
      const height = this.opt.h.toString()
      return `${height.slice(0, 1)}.${height.slice(1)}rem`
    }
  }
}
</script>

<style lang="scss" scoped>
  div {
    height: 2.26rem;
    img {
      width: 100%;
      height: 100%;
    }
  }
</style>